Jeff Walsh [Sun, 26 Sep 2021 14:20:57 +0000 (00:20 +1000)]
pgtk: Handle (child) frame focusing better
child frames on pgtk are gtk widgets inside the parent surface, rather
than subsurfaces (in wayland ters), and the edit widget is handled
separately from the parent window, so we need to handle signals more
correctly, rather than squinting and assuming an event for the window
is just an event for the edit widget.
* src/gtkutil.c (xg_set_no_accept_focus): set
focus on widget rather than request it on window
* src/pgtkterm.c (pgtk_focus_frame): focus frame on edit_widget
instead
(button_event): Implement focus calls to replace dead X calls
Yuuki Harano [Sun, 14 Nov 2021 14:43:15 +0000 (23:43 +0900)]
Add WAYLAND_DISPLAY description to cmdargs.texi
* doc/emacs/cmdargs.texi (Misc Variables): Add WAYLAND_DISPLAY
description.
Jeff Walsh [Fri, 1 Oct 2021 14:28:19 +0000 (00:28 +1000)]
pgtk: Set correct face color for stretched glyphs
* src/pgtkterm.c (x_draw_stretch_glyph_string): s/foreground/background
(Bug#50579)
Jeff Walsh [Fri, 1 Oct 2021 14:50:08 +0000 (00:50 +1000)]
configure.ac (PGTK_LIBS): remove pgtk dl dependency (Bug#50494)
Yuuki Harano [Sun, 14 Nov 2021 11:27:31 +0000 (20:27 +0900)]
Fix coding style
Especially, insert a space between function name and paren.
* src/alloc.c (garbage_collect):
* src/font.h:
* src/frame.h:
* src/fringe.c:
* src/gtkutil.c (xg_set_screen):
(xg_create_frame_widgets):
(xg_create_frame_outer_widgets):
(xg_get_file_name):
(xg_get_font):
(xg_update_scrollbar_pos):
* src/image.c (image_create_bitmap_from_file):
(xpm_load_image):
* src/pgtkfns.c (pgtk_get_monitor_scale_factor):
(is_wayland_display):
(pgtk_display_info_for_name):
(INSTALL_CURSOR):
(Fx_create_frame):
(Fx_display_mm_height):
(Fx_display_mm_width):
(Fx_display_pixel_width):
(Fx_display_pixel_height):
* src/pgtkselect.c (pgtk_selection_usable):
(Fpgtk_own_selection_internal):
(Fpgtk_get_selection_internal):
* src/pgtkterm.c:
(x_set_parent_frame):
(pgtk_draw_fringe_bitmap):
(pgtk_handle_draw):
(scroll_event):
(pgtk_text_scaling_factor):
(pgtk_term_init):
* src/pgtkterm.h:
* src/window.h:
* src/xdisp.c (redisplay_internal):
(draw_glyphs_debug):
(draw_glyphs):
(note_mouse_highlight):
Yuuki Harano [Sat, 13 Nov 2021 07:41:29 +0000 (16:41 +0900)]
Revert #if changes
I changed some "#ifdef"s to "#if defined"s by mistake, so I reverted them.
* src/alloc.c: Reverted.
(garbage_collect): Reverted.
* src/emacs.c (main): Reverted.
* src/image.c (xpm_load_image): Reverted.
(image_disable_image): Reverted.
(image_build_heuristic_mask): Reverted.
Yuuki Harano [Sat, 13 Nov 2021 07:25:48 +0000 (16:25 +0900)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Yuuki Harano [Sat, 13 Nov 2021 07:02:46 +0000 (16:02 +0900)]
Revert atimer changes
They seem to be not needed any more.
* src/atimer.c (set_alarm): Revert
(turn_on_atimers): Revert
(have_buggy_timerfd): Revert
Stefan Kangas [Sat, 13 Nov 2021 06:00:30 +0000 (07:00 +0100)]
Merge from origin/emacs-28
42d4e24ff3 ; Fix typos
0d0125daae Improve documentation of 'decode-coding-region'
Po Lu [Sat, 13 Nov 2021 05:02:09 +0000 (13:02 +0800)]
Prevent NULL-pointer dereference on xwidget callback error
* src/xwidget.c (webkit_javascript_finished_cb): Check if
`error' is NULL before freeing it.
Po Lu [Sat, 13 Nov 2021 03:24:13 +0000 (11:24 +0800)]
Fix file chooser hangs inside xwidget-webkit
* src/xwidget.c (run_file_chooser_cb): New function that runs
a nested event loop instead of acting asynchronously.
(Fmake_xwidget): Attach file chooser signal.
Po Lu [Sat, 13 Nov 2021 00:51:32 +0000 (08:51 +0800)]
Remove unused xwidget code in EmacsFixed GTK widget class
This is no longer required, as we rely on X to position
xwidgets now. It also makes resizing Emacs frames slightly
slower.
* src/emacsgtkfixed.c (EMACS_FIXED_GET_CLASS)
(struct GtkFixedPrivateL)
(emacs_fixed_gtk_widget_size_allocate)
(emacs_fixed_class_init) [HAVE_XWIDGETS]: Remove unused code.
Po Lu [Sat, 13 Nov 2021 00:30:43 +0000 (08:30 +0800)]
Prevent xwidget webkit isearch messages from entering log buffer
* lisp/xwidget.el (xwidget-webkit-isearch--update): Prevent
logging when displaying search contents message.
Ken Brown [Thu, 11 Nov 2021 20:09:24 +0000 (15:09 -0500)]
Don't start both timerfd and alarms on Cygwin
* src/atimer.c (set_alarm) [CYGWIN]: Don't start both timerfd and
alarms; this causes a slowdown. (Bug#51734)
Alan Mackenzie [Fri, 12 Nov 2021 18:43:22 +0000 (18:43 +0000)]
In insert_file_contents, always set windows' point markers.
This fixes bug #51776.
* src/fileio.c (restore_window_points): Restore a w->mpoint even when that
marker originally pointed into the unchanged area near BOB or EOB. This
prevents that window's point being moved a long way from its starting place
due to the removal of the central part of the buffer by insert_file_contents.
Michael Albinus [Fri, 12 Nov 2021 17:17:32 +0000 (18:17 +0100)]
Remove Emacs 25 compatibility from Tramp
* doc/misc/tramp.texi (Remote programs, Remote processes)
(Frequently Asked Questions): Adapt Emacs versions.
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.0-pre".
* lisp/net/tramp-adb.el (top): Don't use `tramp-compat-funcall' for
connection-local functions.
* lisp/net/tramp-compat.el (tramp-unload-file-name-handlers)
(tramp-handle-temporary-file-directory)
(tramp-compat-temporary-file-directory-function)
(tramp-compat-file-attribute-type)
(tramp-compat-file-attribute-link-number)
(tramp-compat-file-attribute-user-id)
(tramp-compat-file-attribute-group-id)
(tramp-compat-file-attribute-access-time)
(tramp-compat-file-attribute-modification-time)
(tramp-compat-file-attribute-status-change-time)
(tramp-compat-file-attribute-size)
(tramp-compat-file-attribute-modes, tramp-file-missing)
(tramp-compat-file-missing, tramp-compat-file-local-name): Remove.
(tramp-compat-file-name-quoted-p, tramp-compat-file-name-quote)
(tramp-compat-file-name-unquote)
(tramp-compat-progress-reporter-update)
(tramp-compat-file-modes, tramp-compat-set-file-modes)
(tramp-compat-set-file-times, tramp-compat-directory-files)
(tramp-compat-directory-files-and-attributes): Adapt implementation.
* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sudoedit.el: Adapt callees.
* lisp/net/tramp-crypt.el (tramp-crypt-config-file-name):
Expand file name.
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-readable-p): Remove.
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Don't check Emacs version.
(tramp-gvfs-handler-mounted-unmounted): Use `make-tramp-file-name'.
* lisp/net/tramp-integration.el (rfn-eshadow-overlay):
Remove declaration.
(top): Don't use `tramp-compat-funcall' for connection-local functions.
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
Use `tramp-rclone-handle-file-readable-p'.
(tramp-rclone-handle-file-readable-p): New defun.
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-handle-file-readable-p'.
* lisp/net/tramp.el (tramp-temp-name-prefix, tramp-lookup-syntax):
Adapt docstring.
(tramp-set-connection-local-variables)
(tramp-set-connection-local-variables-for-buffer): Don't use
`tramp-compat-funcall' for connection-local functions.
(tramp-file-name-for-operation): Reorder list.
(tramp-handle-make-symbolic-link): Don't handle TARGET and
OK-IF-ALREADY-EXISTS.
(tramp-read-passwd): Don't use `read-passwd' any longer.
(top): Don't check for `interrupt-process-functions'.
* test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs26-p):
Remove.
(tramp-archive-test02-file-name-dissect): Use `make-tramp-file-name'.
(all): Replace Emacs 26 compatibility functions with their
original name.
(tramp-archive-test46-auto-load)
(tramp-archive-test46-delay-load): Rename.
* test/lisp/net/tramp-tests.el (dired-aux, seq): Require them.
(dired-compress, connection-local-criteria-alist)
(connection-local-profile-alist, async-shell-command-width):
Don't declare.
(all): Replace Emacs 26 compatibility functions with their
original name.
(tramp-test04-substitute-in-file-name)
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test17-insert-directory)
(tramp-test17-dired-with-wildcards, tramp-test21-file-links)
(tramp-test31-interrupt-process)
(tramp-test34-connection-local-variables)
(tramp-test34-explicit-shell-file-name)
(tramp-test40-make-nearby-temp-file)
(tramp-test41-special-characters, tramp-test42-utf8)
(tramp-test46-delay-load, tramp-test46-remote-load-path)
(tramp-test47-unload): Don't check for Emacs 26 special features.
(tramp--test-emacs26-p): Remove.
(tramp--test-emacs29-p): New defun.
(tramp-test45-dired-compress-file)
(tramp-test45-dired-compress-dir): Use it.
(tramp-test44-asynchronous-requests): Use `seq-random-elt'.
Stefan Kangas [Fri, 12 Nov 2021 12:50:55 +0000 (13:50 +0100)]
; Fix typos
Po Lu [Fri, 12 Nov 2021 12:17:28 +0000 (20:17 +0800)]
Fix typos in etc/PROBLEMS
* etc/PROBLEMS (Internationalization problems): Fix typos.
Po Lu [Fri, 12 Nov 2021 12:15:50 +0000 (20:15 +0800)]
Document problem with fcitx and xwidgets
* etc/PROBLEMS (Internationalization problems): Document buggy fcitx
with xwidgets.
Michael Albinus [Fri, 12 Nov 2021 12:05:54 +0000 (13:05 +0100)]
; * etc/NEWS: Fix typos.
Stefan Kangas [Fri, 12 Nov 2021 10:40:50 +0000 (11:40 +0100)]
* lisp/emacs-lisp/checkdoc.el (checkdoc-dired): Autoload.
Po Lu [Fri, 12 Nov 2021 09:48:56 +0000 (17:48 +0800)]
Add support for input methods to xwidget-webkit-edit-mode
* lisp/xwidget.el (xwidget-webkit--input-method-events): New
variable.
(xwidget-webkit-pass-command-event-with-input-method): New
function.
(xwidget-webkit-pass-command-event): Consult input method about
key events if input method is enabled.
Noam Postavsky [Fri, 12 Nov 2021 09:21:45 +0000 (10:21 +0100)]
Optimize admin/nt dependency computation
admin/nt/dist-build/build-dep-zips.py (immediate_deps)
(extract_deps): Gather package dependency info in batches, rather than
one at a time. This reduces the number of invocations of 'pacman -Si
...' to the depth of the dependency tree, rather than the number of
dependent packages.
(top-level): Don't call 'extract_deps' when given the '-l' option (bug#40628).
Eli Zaretskii [Fri, 12 Nov 2021 08:53:52 +0000 (10:53 +0200)]
Improve documentation of 'decode-coding-region'
* src/coding.c (Fdecode_coding_region): Doc fix.
* doc/lispref/nonascii.texi (Coding System Basics)
(Explicit Encoding): Explain the significance of using 'undecided'
in 'decode-coding-*' functions.
Rasmus [Fri, 12 Nov 2021 08:02:28 +0000 (09:02 +0100)]
lisp/icomplete.el (icomplete-fido-backward-updir): Expand "~/"
* lisp/icomplete.el (icomplete-fido-backward-updir): Expand "~/"
(bug#43925).
Lars Ingebrigtsen [Fri, 12 Nov 2021 07:56:51 +0000 (08:56 +0100)]
Delete .tar.gz temp file after tramp test
* test/lisp/net/tramp-tests.el ()
(tramp-test45-dired-compress-dir): Delete the temp file (bug#51690).
Eli Zaretskii [Fri, 12 Nov 2021 07:50:43 +0000 (09:50 +0200)]
; * lisp/startup.el (command-line-1): Fix a typo in a comment.
Eli Zaretskii [Fri, 12 Nov 2021 07:47:44 +0000 (09:47 +0200)]
; * src/lread.c (safe_to_load_version, Fload): Fix coding style.
Lars Ingebrigtsen [Fri, 12 Nov 2021 07:23:41 +0000 (08:23 +0100)]
Remove unused xlfd_ enums
* src/xfaces.c: Remove xlfd_weight, xlfd_swidth and xlfd_slant
enums. These seem to be unused in the Emacs sources.
Po Lu [Fri, 12 Nov 2021 06:29:40 +0000 (14:29 +0800)]
Remove obsolete comment
The comment probably dated back to when xwidgets supported
many other GTK+ widgets with other data. In the current
implementation of xwidgets, everything that should be freed
is already freed in `kill_buffer_xwidgets'.
* src/xwidget.c (kill_buffer_xwidgets): Remove outdated TODO.
Lars Ingebrigtsen [Fri, 12 Nov 2021 06:19:19 +0000 (07:19 +0100)]
Allow choosing regular-weighted fonts when medium-weighted exist
* src/ftfont.c (ftfont_pattern_entity): Allow using both regular
and medium-weighted fonts.
Stefan Kangas [Fri, 12 Nov 2021 06:17:11 +0000 (07:17 +0100)]
Merge from origin/emacs-28
a6905e90cc Fix problem with temp buffer killing in package-install-file
144ad77fda Fix Lisp Intro markup error
24b86cb4f7 Fix ACL errors with WebDAV volumes on MS-Windows
Po Lu [Fri, 12 Nov 2021 06:16:31 +0000 (14:16 +0800)]
Fix doc string for xwidget-webkit-load-html
* src/xwidget.c (Fxwidget_webkit_load_html): Fix doc string.
Po Lu [Fri, 12 Nov 2021 06:04:38 +0000 (14:04 +0800)]
Add input method support for xwidget webkit isearch
* lisp/xwidget.el (xwidget-webkit-isearch--read-string-buffer):
New variable.
(xwidget-webkit-isearch-printing-char-with-input-method)
(xwidget-webkit-isearch-with-input-method): New function.
(xwidget-webkit-isearch-printing-char): Add support for Emacs
input methods. (bug#51781)
Stefan Kangas [Fri, 12 Nov 2021 04:02:27 +0000 (05:02 +0100)]
image-dired: Quote function symbols as such
* lisp/image-dired.el (image-dired-thumbnail-mode-line-up-map)
(image-dired-thumbnail-mode-tag-map)
(image-dired-thumbnail-mode-map, image-dired-minor-mode-map):
Quote function symbols as such.
Lars Ingebrigtsen [Fri, 12 Nov 2021 03:44:09 +0000 (04:44 +0100)]
Fix problem with temp buffer killing in package-install-file
* lisp/emacs-lisp/package.el (package-install-file): Allow killing
the temporary buffer without querying (bug#51769).
Lars Ingebrigtsen [Fri, 12 Nov 2021 03:39:02 +0000 (04:39 +0100)]
Fix Lisp Intro markup error
* doc/lispintro/emacs-lisp-intro.texi (Insert let): Fix @code
markup error (bug#51777).
Lars Ingebrigtsen [Fri, 12 Nov 2021 03:31:33 +0000 (04:31 +0100)]
Move Info-goto-node-web to "G"
* lisp/info.el (Info-mode-map): Change the Info-goto-node-web
binding to "G" for symmetry with "Info-goto-node".
Stefan Kangas [Fri, 12 Nov 2021 03:27:11 +0000 (04:27 +0100)]
Make image-dired-thumbnail-mode non-interactive
* lisp/image-dired.el (image-dired-thumbnail-mode): No longer
interactive, as it only makes sense in a specially prepared buffer.
Stefan Kangas [Fri, 12 Nov 2021 03:10:40 +0000 (04:10 +0100)]
image-dired: Revamp slideshow functionality
* lisp/image-dired.el
(image-dired-slideshow-delay): New defcustom.
(image-dired--slideshow-initial): New defvar.
(image-dired-slideshow-start): Don't show any prompts when starting a
slideshow, unless user gave a negative prefix argument. Use the value
of the above new defcustom as the default delay.
(image-dired-slideshow-stop): Don't count number of images. Instead,
continue the slideshow until the next command.
(image-dired-slideshow-step): Use the correct buffer.
(image-dired-slideshow-count, image-dired-slideshow-times): Make
obsolete.
(image-dired--slideshow-timer): Rename from
'image-dired-slideshow-timer'. Make the old name into an obsolete
variable alias.
(image-dired-display-image-mode-map)
(image-dired-thumbnail-mode-map): Bind 'image-dired-slideshow-start'
to "S".
(image-dired-thumbnail-mode-menu): Add 'image-dired-slideshow-start'.
Stefan Kangas [Fri, 12 Nov 2021 02:51:21 +0000 (03:51 +0100)]
image-dired: Improve thumbnail mode menu
* lisp/image-dired.el (image-dired-thumbnail-mode-menu): Improve menu
with more logical ordering and better naming.
Bryan C. Mills [Fri, 12 Nov 2021 03:26:28 +0000 (04:26 +0100)]
Make "emacs --script /dev/stdin work again when that's a pipe
* src/lread.c (Fload): Adjust callers.
* src/lread.c (safe_to_load_version): Check lseek errors
(Bug#48940).
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Fri, 12 Nov 2021 03:21:56 +0000 (04:21 +0100)]
Allow using /dev/stdin as a --script parameter again
* lisp/startup.el (command-line-1): Fix breakage with
(file-truename "/dev/stdin") => "/proc/227795/fd/pipe:[
1381505]"
when using /dev/stdin as a --script parameter.
Po Lu [Fri, 12 Nov 2021 03:19:30 +0000 (11:19 +0800)]
Fix potential NULL dereference in xwidget-webkit-uri
* src/xwidget.c (Fxwidget_webkit_uri): Don't assume
webkit_web_view_get_uri will always return a valid string.
Po Lu [Fri, 12 Nov 2021 02:36:57 +0000 (10:36 +0800)]
Check for WebKit xwidgets inside all xwidget-webkit functions
This is done in preparation for the introduction of other
xwidgets, such as media xwidgets, even though there are
only WebKit widgets at present.
* src/xwidget.c (CHECK_WEBKIT_XWIDGET): New macro.
(WEBKIT_FN_INIT): Use CHECK_WEBKIT_XWIDGET.
(Fxwidget_webkit_search, Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_webkit_finish_search)
(Fxwidget_webkit_load_html): Check that xwidget is a WebKit
widget.
Lars Ingebrigtsen [Fri, 12 Nov 2021 02:31:48 +0000 (03:31 +0100)]
Fix image-animate declaration
* lisp/net/shr.el (image-animate): Fix declaration.
Lars Ingebrigtsen [Fri, 12 Nov 2021 02:29:51 +0000 (03:29 +0100)]
Make gnus-article-stop-animations obsolete
* lisp/gnus/gnus-art.el (gnus-article-stop-animations): Make
obsolete now that animated images stop themselves automatically.
(gnus-article-setup-buffer):
* lisp/gnus/gnus-sum.el (gnus-summary-exit)
(gnus-summary-exit-no-update, gnus-summary-show-article): Remove
callers.
Lars Ingebrigtsen [Fri, 12 Nov 2021 02:27:23 +0000 (03:27 +0100)]
Allow stopping animations automatically when the image disappears
* lisp/image.el (image-animate): Allow the animation to be stopped
automatically when the image is removed from the buffer.
(image-animate-timeout): Stop the animation if the image is
removed (and that has been requested).
* lisp/net/shr.el (shr-put-image): Stop animations if the image is
removed.
Po Lu [Fri, 12 Nov 2021 01:53:30 +0000 (09:53 +0800)]
Prevent crashes from Lisp code modifying xwidget-list
* src/xwidget.c (internal_xwidget_view_list)
(internal_xwidget_list): New variable.
(find_xwidget_for_offscreen_window)
(define_cursors, offscreen_damage_event)
(webkit_ready_to_show, xwidget_init_view)
(Fxwidget_resize, Fdelete_xwidget_view)
(Fxwidget_view_lookup, xwidget_spec_value)
(lookup_xwidget, xwidget_end_redisplay)
(kill_frame_xwidget_views, kill_buffer_xwidgets)
(Fmake_xwidget, Fget_buffer_xwidgets): Use internal list.
(syms_of_xwidget): Initialize internal xwidget lists.
Po Lu [Fri, 12 Nov 2021 00:17:41 +0000 (08:17 +0800)]
Prevent crashes in xwidgets whose buffers have been killed
* doc/lispref/display.texi (Xwidgets): Explain meaning of killed
xwidgets.
* src/xwidget.c (Fxwidget_live_p): New function.
(Fxwidget_perform_lispy_event, WEBKIT_FN_INIT)
(Fxwidget_resize, Fxwidget_size_request)
(Fxwidget_info, Fxwidget_plist)
(Fset_xwidget_buffer, Fset_xwidget_plist)
(Fset_xwidget_query_on_exit_flag)
(Fxwidget_query_on_exit_flag)
(Fxwidget_webkit_search)
(Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_webkit_finish_search)
(Fxwidget_webkit_load_html): Check for live xwidgets instead of
just xwidgets.
(xwidget_button, xwidget_motion_or_crossing)
(xv_do_draw, x_draw_xwidget_glyph_string)
(Fdelete_xwidget_view): Ignore killed xwidgets.
(syms_of_xwidget): Define new symbols and subrs and define
appropriate weakness of id_to_xwidget map.
(kill_buffer_xwidgets): Check live xwidgets instead of
killed xwidgets, set xwidget buffer to nil, and rely on GC to
free the hash table for us instead.
* src/xwidget.h (XWIDGET_LIVE_P, CHECK_LIVE_XWIDGET): New
macros.
Eli Zaretskii [Thu, 31 Dec 2020 18:28:30 +0000 (20:28 +0200)]
Fix compilation on MS-Windows
* src/callproc.c (emacs_spawn) <fork_done>: Define the label only
if USABLE_POSIX_SPAWN is defined, to avoid a compiler warning.
Philipp Stephani [Wed, 30 Dec 2020 13:42:01 +0000 (14:42 +0100)]
Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux. Use
it if we don't need to configure a pseudoterminal.
* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.
Eli Zaretskii [Thu, 11 Nov 2021 19:41:10 +0000 (21:41 +0200)]
Fix ACL errors with WebDAV volumes on MS-Windows
* src/w32.c (acl_get_file): Handle ERROR_INVALID_FUNCTION from
WebDAV. Patch from Ioannis Kappas <ioannis.kappas@gmail.com>.
(Bug#51773)
Jim Porter [Thu, 11 Nov 2021 18:34:17 +0000 (19:34 +0100)]
Improve performance of 'file-name-case-insensitive-p' for Tramp files
Previously, each function in 'tramp-foreign-file-name-handler-alist'
would call 'tramp-dissect-file-name', resulting in it being called
several times whenever 'tramp-find-foreign-file-name-handler' was
called. Now, functions take the dissected file name to avoid this
duplicated effort. (Bug#51699)
* etc/NEWS: Announce this change.
* lisp/net/tramp-adb.el (tramp-adb-file-name-p):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-p):
* lisp/net/tramp-smb.el (tramp-smb-file-name-p):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p):
Accept dissected file names.
* lisp/net/tramp.el (tramp-ensure-dissected-file-name): New function.
(tramp-find-foreign-file-name-handler): Pass dissected file name to
functions.
(tramp-connectable-p): Use 'tramp-ensure-dissected-file-name'.
Stefan Kangas [Thu, 11 Nov 2021 17:39:19 +0000 (18:39 +0100)]
erc: Don't announce broken functionality in /query docstring
* lisp/erc/erc.el (erc-cmd-QUERY): Be less enthusiastic about
announcing missing/broken functionality. The comment "except this is
broken right now" has been there since 2008, and it's not obvious to
me that we should ever re-add it.
Filipp Gunbin [Thu, 11 Nov 2021 16:44:27 +0000 (19:44 +0300)]
* lisp/subr.el (add-hook): Fix adding into hook--depth-alist (bug#51620).
Yuuki Harano [Thu, 11 Nov 2021 15:21:12 +0000 (00:21 +0900)]
Merge branch 'feature/pgtk' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Eli Zaretskii [Thu, 11 Nov 2021 14:58:47 +0000 (16:58 +0200)]
; * src/term.c (init_tty): Fix last change.
Eli Zaretskii [Thu, 11 Nov 2021 14:56:46 +0000 (16:56 +0200)]
; * src/term.c (init_tty): Fix style of parentheses.
Eli Zaretskii [Thu, 11 Nov 2021 14:55:11 +0000 (16:55 +0200)]
Fix 8-color PuTTY -nw sessions broken by a recent commit
* src/term.c (init_tty): Fix the change which introduced support
for the terminfo Tc flag. The code as installed broke colors in
PuTTY -nw sessions, because 'tigetflag' returned -1, which is
non-zero, so it was treated as the sign that true color is
supported. But if the value returned by 'tigetflag' is -1, it means
the capability is not a boolean one, so that's not to be used as a
valid support for 24-bit color. (Bug#44950)
Lars Ingebrigtsen [Thu, 11 Nov 2021 12:20:34 +0000 (13:20 +0100)]
Fix problem with non-absolute names
* lisp/files.el (file-name-split): Fix problem with non-absolute
names.
Lars Ingebrigtsen [Thu, 11 Nov 2021 07:09:59 +0000 (08:09 +0100)]
Add a command to go the gnu.org version of the info page
* lisp/info.el (Info-url-for-node):
(Info-goto-node-web): New function (bug#44895).
Based on code from Drew Adams <drew.adams@oracle.com>.
Eli Zaretskii [Thu, 11 Nov 2021 11:12:50 +0000 (13:12 +0200)]
; * lisp/server.el (server-stop-automatically): Doc fix.
Eli Zaretskii [Thu, 11 Nov 2021 10:58:58 +0000 (12:58 +0200)]
; * etc/NEWS: Improve a recently added entry.
Michael Albinus [Thu, 11 Nov 2021 10:55:15 +0000 (11:55 +0100)]
Merge from origin/emacs-28
6dae01ad6d Fix tramp-compat-file-name-concat (Bug#51754)
Aleksandr Vityazev [Thu, 11 Nov 2021 10:53:41 +0000 (11:53 +0100)]
Fix tramp-compat-file-name-concat (Bug#51754)
* lisp/net/tramp-compat.el: Make `tramp-compat-file-name-concat'
work like file-name-concat. (Bug#51754)
Po Lu [Thu, 11 Nov 2021 10:45:52 +0000 (18:45 +0800)]
Add URI as a valid spec for xwidget-webkit-buffer-name-format
* lisp/xwidget.el (xwidget-webkit-buffer-name-format): Update
doc string.
(xwidget-webkit-callback): Add a format spec %U, which stands
for the current URI of the widget.
Feng Shu [Thu, 11 Nov 2021 10:24:49 +0000 (18:24 +0800)]
xwidget: Add xwidget-webkit-buffer-name-format.
* lisp/xwidget.el (xwidget-webkit-buffer-name-prefix):
Remove variable.
(xwidget-webkit-buffer-name-format): New variable.
(xwidget-webkit-callback): Use
xwidget-webkit-buffer-name-format instead.
(format-spec): required.
* etc/NEWS: Note xwidget-webkit-buffer-name-format.
Stefan Kangas [Thu, 11 Nov 2021 09:22:05 +0000 (10:22 +0100)]
; * admin/gitmerge.el: Fix typos.
Eli Zaretskii [Thu, 11 Nov 2021 08:58:10 +0000 (10:58 +0200)]
Fix files-tests on MS-Windows
* lisp/ls-lisp.el (ls-lisp--insert-directory): Fix free disk space
calculation. (Bug#50630)
* test/lisp/files-tests.el (files-tests-revert-buffer)
(files-tests-revert-buffer-with-fine-grain): Disable locking
files.
Po Lu [Thu, 11 Nov 2021 06:54:58 +0000 (14:54 +0800)]
Fix documentation in xwidget.el
* src/xwidget.el (xwidget-webkit-isearch-mode): Reword
documentation.
Po Lu [Thu, 11 Nov 2021 02:13:42 +0000 (10:13 +0800)]
Switch to xwidget webkit buffer even if a session already exists
* lisp/xwidget.el (xwidget-webkit-goto-url): Make behavior
when there is an existing session consistent.
Stefan Kangas [Thu, 11 Nov 2021 06:17:56 +0000 (07:17 +0100)]
Merge from origin/emacs-28
2963de6540 * lisp/vc/vc-git.el (vc-git-mergebase): More meaningful er...
a9148cdee5 ; Fix heading in etc/NEWS
9623342216 ; * etc/NEWS: Move a bookmark related item further down.
# Conflicts:
# etc/NEWS
Tim Ruffing [Thu, 11 Nov 2021 06:14:57 +0000 (07:14 +0100)]
Support Tc terminfo flag for 24-bit color support in terminal
* src/term.c (init_tty): Use the Tc flag (bug#44950).
Copyright-paperwork-exempt: yes
Gregory Heytings [Thu, 11 Nov 2021 05:43:10 +0000 (06:43 +0100)]
Options to automatically stop the Emacs server
* doc/emacs/misc.texi (Emacs Server): Document the new function.
Also mention that an Emacs server can be started with emacsclient.
* etc/NEWS: Describe the new function (bug#51377).
* lisp/server.el (server-stop-automatically): New function.
(server-stop-automatically): New auxiliary variable.
(server-stop-automatically--maybe-kill-emacs)
(server-stop-automatically--handle-delete-frame): New auxiliary
functions.
(server-save-buffers-kill-terminal): Call the new auxiliary
function when necessary.
Miha Rihtaršič [Thu, 11 Nov 2021 05:16:52 +0000 (06:16 +0100)]
Set `minibuffer-completion-*` variables locally in more places
* lisp/calc/calc-store.el (calc-read-var-name):
* lisp/emacs-lisp/crm.el (completing-read-multiple):
* lisp/progmodes/cc-styles.el (c-read-offset):
* lisp/window.el (read-buffer-to-switch):
Set `minibuffer-completion-*` variables buffer-locally instead of
using a global let-binding (bug#48925).
Follow-up to commit
2021-05-01 "* lisp/minibuffer.el (completing-read-default): Fix bug#45474"
Lars Ingebrigtsen [Thu, 11 Nov 2021 04:22:02 +0000 (05:22 +0100)]
Re-fix charset issues when yanking non-plain-text elements
* lisp/select.el (gui-get-selection): Make (gui-get-selection
'CLIPBOARD 'text/html) get decoded correctly (bug#31149), but still
avoid the logic on Windows.
Lars Ingebrigtsen [Thu, 11 Nov 2021 04:04:31 +0000 (05:04 +0100)]
Don't save places in literally-visited files
* lisp/saveplace.el (save-places-to-alist): Don't save places in
literally-visited files (bug#51740).
John Cummings [Thu, 11 Nov 2021 03:37:46 +0000 (04:37 +0100)]
Add tests for 'insert-directory'
* test/lisp/files-tests.el: Add 'insert-directory' tests.
* test/lisp/files-resources/insert-directory/: Create directories and files to
use for testing 'insert-directory'.
Add tests for 'insert-directory' base functionality and regression tests for
the issue where free space was reported for the current directory instead of
the target of 'list-directory' (Bug#50630).
Lars Ingebrigtsen [Thu, 11 Nov 2021 03:08:51 +0000 (04:08 +0100)]
Note that loaddefs.el is copied to ldefs-boot.el
* lisp/emacs-lisp/autoload.el (autoload-rubric): Add a comment to
the file noting what'll happen to it.
Lars Ingebrigtsen [Thu, 11 Nov 2021 03:02:43 +0000 (04:02 +0100)]
Re-generated to get autoloads additions in emoji.el
Po Lu [Wed, 10 Nov 2021 13:01:40 +0000 (21:01 +0800)]
Add `xwidget-webkit-load-html'
* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce new function.
* src/xwidget.c (Fxwidget_webkit_load_html): New function.
(syms_of_xwidget): Define new subr.
Filipp Gunbin [Wed, 10 Nov 2021 20:00:56 +0000 (23:00 +0300)]
; Refer to Repeating from compare-windows info node
* doc/emacs/files.texi (Comparing Files): C-x z (`repeat') is very
convenient to use with compare-windows, so refer to its node.
Juri Linkov [Wed, 10 Nov 2021 18:41:19 +0000 (20:41 +0200)]
* lisp/vc/vc-git.el (vc-git-mergebase): More meaningful error message.
Display a readable error message instead of signaling an error on nil value.
Juri Linkov [Wed, 10 Nov 2021 18:36:41 +0000 (20:36 +0200)]
* etc/NEWS.28: Add changes omitted while merging from emacs-28 NEWS.
Juri Linkov [Wed, 10 Nov 2021 18:23:16 +0000 (20:23 +0200)]
* etc/NEWS: Remove old news accidentally merged from emacs-28.
Eli Zaretskii [Wed, 10 Nov 2021 18:17:33 +0000 (20:17 +0200)]
Fix font weights on MS-Windows
* src/w32font.c (w32_decode_weight, w32_encode_weight)
(w32_to_fc_weight): Adjust weight translations to match those in
font.c and gtkutil.c:xg_weight_to_symbol. (Bug#51704)
Robert Pluim [Wed, 10 Nov 2021 16:42:30 +0000 (17:42 +0100)]
Improve 'ensure-empty-lines' docstring
* lisp/emacs-lisp/subr-x.el (ensure-empty-lines): Fix typo and improve
wording.
Robert Pluim [Wed, 10 Nov 2021 15:25:55 +0000 (16:25 +0100)]
; * etc/NEWS: Improve some entries.
Robert Pluim [Wed, 10 Nov 2021 16:03:32 +0000 (17:03 +0100)]
; * etc/NEWS: Fix merge error
Robert Pluim [Wed, 10 Nov 2021 15:45:47 +0000 (16:45 +0100)]
; * etc/NEWS: Fix merge error
Yuuki Harano [Wed, 10 Nov 2021 15:39:53 +0000 (00:39 +0900)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Stefan Kangas [Wed, 10 Nov 2021 15:37:47 +0000 (16:37 +0100)]
* admin/update_autogen: Remove unused variables.
Stefan Kangas [Wed, 10 Nov 2021 15:30:50 +0000 (16:30 +0100)]
Use "grep -E" instead of deprecated "egrep"
* admin/emake:
* test/lisp/so-long-tests/so-long-tests.el: Use "grep -E" instead of
deprecated "egrep".
Stefan Kangas [Wed, 10 Nov 2021 14:15:09 +0000 (15:15 +0100)]
Avoid another byte-compiler warning in package-quickstart.el
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Avoid
byte-compiler warning "assignment to free variable" in
package-quickstart.el.
Stefan Kangas [Wed, 10 Nov 2021 13:49:44 +0000 (14:49 +0100)]
Avoid spurious byte-compiler warnings in package-quickstart.el
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Disable the
"`make-variable-buffer-local' not called at toplevel" byte-compiler
warnings. Given that we wrap it all in a let-form, these are mostly
false positives and not helpful.
Michael Albinus [Wed, 10 Nov 2021 12:40:44 +0000 (13:40 +0100)]
; Fix heading in etc/NEWS
Stefan Kangas [Wed, 10 Nov 2021 12:17:14 +0000 (13:17 +0100)]
; * etc/NEWS: Move a bookmark related item further down.
Stefan Kangas [Wed, 10 Nov 2021 12:06:24 +0000 (13:06 +0100)]
* admin/automerge: Fix quoting of some variables.
Stefan Kangas [Wed, 10 Nov 2021 12:01:30 +0000 (13:01 +0100)]
* admin/automerge: Use mktemp if it exists.